/*
 * copyright (c) 2013 Blaise-Florentin Collin
 *
 * This file is part of astroDCAM.
 *
 * AstroAviBrowser is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License v3
 * as published by the Free Software Foundation
 *
 * AstroAviBrowser is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * v3 along with AstroAviBrowser; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
 * MA 02110-1301 USA
 */

///
/// \file QAstroMainWindow.hpp
/// \brief Main GUI object (headers)
///

#ifndef _QASTROMAINWINDOW_HPP_
#define _QASTROMAINWINDOW_HPP_

// Qt includes
#include <QApplication>
#include <QWidget>
#include <QLayout>

// C++ app includes
#include "dc1394bus.hpp"

// Qt app include
#include "QAstroMainSettings.hpp"
#include "QAstroTab.hpp"
#include "QAstroCameraTab.hpp"
#include "QAstroRecordTab.hpp"
#include "QAstroSettingsTab.hpp"
#include "QAstroFrameDisplay.hpp"

///
/// \class QAstroMainWindow
/// \brief Main GUI object
///
/// This object is the main GUI widget.\n
/// QWidget public heritage
///
class QAstroMainWindow : public QWidget
{
   Q_OBJECT
   public :
      /// The main constructor
      QAstroMainWindow(dc1394bus* bus, QApplication* a, QWidget* parent=NULL);
      /// Builds the GUI
      int buildGUI();
   private :
      // attributes
      QApplication* app; ///< App pointer needed to close the application.

      // GUI
      QHBoxLayout* layout; ///< Widget layout
      QAstroMainSettings* mainSettings; ///< Main settings tab
      QAstroFrameDisplay* mainFrame; ///< Main frame display
      QAstroCameraTab* cameraTab; ///< Camera Tab
      QAstroRecordTab* recordTab; ///< Record Tab
      QAstroSettingsTab* settingsTab; ///< Settings Tab

      // ieee1394 stuff
      dc1394bus* mainBus; ///< Object wrapping the ieee1394 bus
};

#endif
